<?php
    require_once('../../../Connections/ocmanmanager.php'); 
    require_once('../../../Connections/checkuser.php');
?>

<?php

$colname_issuenotes = "-1";
if (isset($_GET['id'])) {
  $colname_issuenotes = $_GET['id'];
}
//selecting issue

mysql_select_db($database_ocmanmanager, $ocmanmanager); //issue notes details
$query_issuenotes = sprintf("SELECT * FROM issuenotes WHERE issueid = %s ORDER BY dateadded ASC", GetSQLValueString($colname_issuenotes, "int"));
$issuenotes = mysql_query($query_issuenotes, $ocmanmanager) or die(mysql_error());
$row_issuenotes = mysql_fetch_assoc($issuenotes);
$totalRows_issuenotes = mysql_num_rows($issuenotes);
?>

<table>
    <?php 
    if($totalRows_issuenotes<1){
        echo "<tr><td colspan='7' border='1'>Nothing to display</td></tr>";
    }
    else{
        do{?>
            <tr>
            <td><?php echo $row_issuenotes['notetitle'];?></td>
            <td><?php //echo $row_issuenotes['note'];?></td>
            <td><?php echo $row_issuenotes['dateadded'];?></td>
            <td><?php echo $row_issuenotes['issueid'];?></td>
            <td><?php echo $row_issuenotes['addedby'];?></td>
            <td><?php echo $row_issuenotes['important'];?></td>
            <td><?php echo $row_issuenotes['deleted'];?></td>
            </tr>
            
            
        <?php } while ($row_issuenotes = mysql_fetch_assoc($issuenotes));
    }?>
</table>
<?php
mysql_free_result($issuenotes)
?>
<table>
    <tr>
        <td>Notetitle</td>
        <td>note</td>
        <td>dateadded</td>
        <td>issueid</td>
        <td>addedby</td>
        <td>important</td>
        <td>Deleted</td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>